package savelog;

/**
 * Title: Saves class for CSIS 343 Final Project 
 * Description: CS 343 Final Project - Saves This class will handle all of the saves the user has
 * 
 * @author Erik Olson
 * @email erik.olson-5@my.uwrf.edu
 * @author Mike Harmon
 * @email michael.harmon@my.uwrf.edu
 * @author Jack Friermuth
 * @email jack.friermuth@my.uwrf.edu
 * @author Luke Vang
 * @email luke.vang@my.uwrf.edu
 * @author Casey Golla
 * @email casey.golla@my.uwrf.edu
 * @date December 4th 2012
 */
public class Saves {
	
	//id of the save
	private int save_id;
	
	//id of the game that the save is for
	private int game_id;
	
	//description of the save
	private String save_descrip;
	
	//date that the save was created on local device, Y/M/D k:m:s:S, year/month/day hour:minute:second:millisecond
	private String save_date_created;
	
	//date that the save was pushed to SaveLog, Y/M/D k:m:s:S, year/month/day hour:minute:second:millisecond
	private String save_date_logged;
	
	//path to the source folder that contains there saves
	private String save_src;
	
	//id of the device that the save came from
	private int dev_id;
	
	/**
	 * default constructor
	 */
	public Saves() {
		this.save_id = 0;
		this.game_id = 0;
		this.save_descrip = "";
		this.save_date_created = "";
		this.save_date_logged = "";
		this.save_src = "";
		this.dev_id = 0;
	}
	
	/**
	 * Alternate constructor
	 * @param int save_id				:	save id for save
	 * @param int game_id				:	game id save is for
	 * @param string save_descrip		:	description of save
	 * @param string save_date_created :	when the save was created
	 * @param string save_date_logged  :	when the save was logged into SaveLog
	 * @param string save_src			:	path to where the save is located
	 * @param int dev_id				:	id of device save is on
	 */
	public Saves(int save_id, int game_id, String save_descrip,
			String save_date_created, String save_date_logged, String save_src,
			int dev_id) {

		this.save_id = save_id;
		this.game_id = game_id;
		this.save_descrip = save_descrip;
		this.save_date_created = save_date_created;
		this.save_date_logged = save_date_logged;
		this.save_src = save_src;
		this.dev_id = dev_id;
	}
	
	/**
	 * method to get the save id
	 * @return	int save_id :	The id for the save file
	 */
	public int getSave_id() {
		return save_id;
	}
	
	/**
	 * method to set the save id
	 * @param int new_id : 		New value for the save id
	 */
	public void setSave_id( int new_id ) {
		this.save_id = new_id;
	}
	
	/**
	 * method to get the game id
	 * @return int game_id :	The id of the game that the save is for
	 */
	public int getGame_id() {
		return game_id;
	}
	
	/**
	 * method to set the game id that the save is for
	 * @param int new_id :		The new game id
	 */
	public void setGame_id( int new_id ) {
		this.game_id = new_id;
	}
	
	/**
	 * method to get the description of the game
	 * @return string save_descrip :	The description of the save
	 */
	public String getSave_descrip() {
		return save_descrip;
	}
	
	/**
	 * method to set the save description
	 * @param string new_descrip : 		The new save description
	 */
	public void setSave_descrip( String new_descrip ) {
		this.save_descrip = new_descrip;
	}
	
	/**
	 * method to get the date that the save was created
	 * @return string save_date_created : 	The date that the save was created
	 */
	public String getSave_date_created() {
		return save_date_created;
	}
	
	/**
	 * method to set the date the save was created
	 * @param string new_date : 	the new date the save was created
	 */
	public void setSave_date_created( String new_date ) {
		this.save_date_created = new_date;
	}
	
	/**
	 * method to get when the save was logged into SaveLog
	 * @return string save_date_logged :	The date the save was logged into SaveLog
	 */
	public String getSave_date_logged() {
		return save_date_logged;
	}
	
	/**
	 * method to set when the save was logged into SaveLog
	 * @param string new_date : 	the new date that the save was logged into SaveLog
	 */
	public void setSave_date_logged( String new_date ) {
		this.save_date_logged = new_date;
	}
	
	/**
	 * method to get the source path to the saves on the local device
	 * @return string save_src :	the source path to the saves
	 */
	public String getSave_src() {
		return save_src;
	}
	
	/**
	 * method to set the source path to the saves on the local device
	 * @param string new_src :		the new source path to the saves
	 */
	public void setSave_src( String new_src ) {
		this.save_src = new_src;
	}
	
	/**
	 * method to get the device id this save is from
	 * @return int dev_id :		the id of the device this save is for
	 */
	public int getDev_id() {
		return dev_id;
	}
	
	/**
	 * method to set the device id this save is for
	 * @param int new_id : 		the new device id
	 */
	public void setDev_id( int new_id ) {
		this.dev_id = new_id;
	}

	@Override
	public String toString() {
		return "Saves [save_id=" + save_id + ", game_id=" + game_id
				+ ", save_descrip=" + save_descrip + ", save_date_created="
				+ save_date_created + ", save_date_logged=" + save_date_logged
				+ ", save_src=" + save_src + ", dev_id=" + dev_id + "]";
	}
	
}
